package src.components {
	
	/**
	* 
	* Reliability project
	* -----------------------
	* @author  Dmitrij Boycov
	* @mail    dmitry.boycov@gmail.com
	* @date    April 27, 2010
	* @version 1
	* 
	*/
	
	import flash.display.DisplayObject;
	import flash.events.MouseEvent;
	//import flash.text.TextFormat;
	//
	import src.components.ToolTip;
	import src.components.AbstractButton;
	
	public class MenuButton extends AbstractButton{		
		
		public function MenuButton() {
			super();
			this.gotoAndStop(1);
			this.mouseChildren = false;
			
			addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
			addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);			
			addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
			addEventListener(MouseEvent.MOUSE_UP, onMouseUp);	
		}		
		
		public function setImg(img:DisplayObject) {
			if (img != null) {
				img.x = this.width / 2 - img.width / 2;
				img.y = this.height / 2 - img.height / 2;
				this.addChild(img);
			}
		}
	}
	
}